home *** CD-ROM | disk | FTP | other *** search
- Path: news.compuserve.com!newsmaster
- From: <73067.3334@compuserve.com>
- Newsgroups: comp.lang.c++
- Subject: "new" creams data structure -- why?
- Date: 1 Feb 1996 23:08:16 GMT
- Organization: CompuServe Incorporated
- Message-ID: <4erh50$4hp@dub-news-svc-3.compuserve.com>
- NNTP-Posting-Host: dd40-180.compuserve.com
- Content-Type: text/plain
- Keywords: new memory
- Content-length: 417
- X-Newsreader: AIR Mosaic (16-bit) version 4.00.08.32
-
-
- dear experts: why would the following line alloc memory where there is
- insufficient space for it? when i memcpy to clear the string, it wipes out
- a data structure i needed. the line is
-
- char* somestring = new char [300];
-
- when it's my fault i can deal with it, but how do i prevent this? or is it
- a scoping problem or something?
-
- many thanks for any ideas.
-
- stephen toney
- 73067.3334@compuserve.com
-
-